﻿@using System.Data;
@using GatewayServer.Common;
@using UtilsBase;
@{
    ViewBag.PageTitle = "洪峰智能";

    Layout = "~/Views/Shared/PageTemplate.cshtml";
}

<script>
    $(document).ready(function () {



    });
    function saveSetMQTTConfig() {
        var data = $("#addForm").serializeArray(); //自动将form表单封装成json
        $.post("saveSetMQTTConfig", data, function (result) {
            var jsonresult = (result);

            if (jsonresult.respCode == "200") {
                $("#result").text("操作完成");
                //  window.location.href = "list";
                // window.history.back();
            }
            else {
                alert(jsonresult.respMsg);
                return;
            }
        });

    }
</script>

<style>
    #pagelist_follow {
        width: 100%;
    }

    #pagelist_main {
        width: 100%;
    }

    .kv-item label {
        width: 150px;
    }
</style>
<div id="saper-container">
    <form id="addForm" name="addForm" action="list" method="post">
        <input type="hidden" name="d_guid" id="d_guid" value="@ViewBag.d_guid" />

        <div id="saper-hd"></div>
        <div id="saper-bd">
            <div class="subfiled clearfix">
                <h2>网关升级</h2>
            </div>
            <div class="subfiled-content">

                <div id="" title="添加/编辑">
                    <form action="" name="addForm" id="addForm" method="post">

                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>网关编号：</label>
                            <div class="kv-item-content">
                                <label id="gw_code" style="text-align:left">@(ViewBag.gw_code)</label>
                            </div>
                        </div>
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>MQ通道名称：</label>
                            <div class="kv-item-content">
                                <input type="text" name="quene" id="quene" placeholder="MQ通道名称" />
                                <br />
                                iot_gateway_
                                <br />
                                iot_gateway_upgrade_
                            </div>
                        </div>
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>UserName：</label>
                            <div class="kv-item-content">
                                <input type="text" name="UserName" id="UserName" placeholder="UserName" />
                            </div>
                        </div>
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>Password：</label>
                            <div class="kv-item-content">
                                <input type="text" name="Password" id="Password" placeholder="Password" />
                            </div>
                        </div>
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>HostName：</label>
                            <div class="kv-item-content">
                                <input type="text" name="HostName" id="HostName" placeholder="HostName" />
                            </div>
                        </div>
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>Port：</label>
                            <div class="kv-item-content">
                                <input type="text" name="Port" id="Port" placeholder="Port" />
                            </div>
                        </div>
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>VirtualHost：</label>
                            <div class="kv-item-content">
                                <input type="text" name="VirtualHost" id="VirtualHost" placeholder="VirtualHost" />
                            </div>
                        </div>
                        <div><hr /></div>
                        <div style="margin:0 auto;width:150px;">

                            <input type="button" id="save" name="save" value="发送" onclick="javascript:saveSetMQTTConfig()" />
                            &nbsp;&nbsp; <input type="button" id="but_back" name="but_back" value="返回" />
                        </div>


                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>返回结果：</label>
                            <div class="kv-item-content">
                                <label id="result" style="text-align:left;min-width:500px"></label>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div id="saper-ft"></div>
    </form>
</div>

